import app from './bootstrap';
// import Routes from './router';
// Routes(app);

// 全局错误事件监听
app.on('error', (error) => {
    // tslint:disable-next-line:no-console
    console.error(error);
});

/*注册 路由在这里*/
import UserController from './controller/userController';
import FieldController from './controller/fieldController';

new UserController();
new FieldController();

//注入 config  //mongo
import "./config/index";

const port = 4560;
app.listen(port);
// tslint:disable-next-line:no-console
console.log("端口打开在 " + port);
// open(`http://localhost:${port}`);